package org.dongchao.statistics.exe;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * spring init finised, -> our job begin run .
 * @author dongyazhuo
 */
@Component
public class StatisticsStart implements ApplicationRunner {

	@Autowired
	Execute execute;

	@Override
	public void run(ApplicationArguments args) throws Exception {
		new Thread(() -> execute.execute()).start();
	}

}
